package com.longge;

public class AverageValue {

    public int averageValue(int[] nums) {

        int count = 0,sum = 0;
        for (int num : nums) {
            if (num%3==0&&num%2==0){
                count++;
                sum+=num;
            }
        }
        return count==0?0: sum/count;
    }
}
